package
{
	import capricornus.Capricornus;
	import capricornus.core.RefreshManager;
	import capricornus.utils.shake.ShakeController;
	
	import flash.display.Bitmap;
	import flash.display.Sprite;
	import flash.events.MouseEvent;
	
	public class ShakeTest extends Sprite
	{
		[Embed(source="role02.png")]
		private var _imageClass:Class;
		
		private var _image:Bitmap;
		private var _shakeController:ShakeController;
		
		public function ShakeTest()
		{
			super();
			init();
		}
		
		private function init():void
		{
			Capricornus.initialize( stage );
			RefreshManager.instance.start();
			
			_image = new _imageClass() as Bitmap;
			addChild( _image );
			_image.x = 50;
			_image.y = 50;
			
			_shakeController = new ShakeController( _image );
			
			stage.addEventListener( MouseEvent.CLICK, onClick );
		}
		
		private function onClick( e:MouseEvent ):void
		{
			_shakeController.start();
		}
	}
}